package org.ivwsqii.command.example;
/**
 * 	按键 命令的发送者，请求者角色
 * @author wyl
 *	2019年3月30日
 */
public class KeyPad {

    private Command playCommand;
    private Command rewindCommand;
    private Command stopCommand;

    public void setPlayCommadn(Command playCommand) {
        this.playCommand = playCommand;
    }
    public void setRewindCommadn(Command rewindCommand) {
        this.rewindCommand = rewindCommand;
    }
    public void setStopCommadn(Command stopCommand) {
        this.stopCommand = stopCommand;
    }

    public void play() {
        playCommand.execute();
    }
    public void rewind() {
        rewindCommand.execute();
    }
    public void stop() {
        stopCommand.execute();
    }
}
